import request from '@/utils/request'

export const RoleApi = {

    /**
     *  获取所有角色
     * @returns
     */
    getAllList: () => {
        return request({
            url: '/manage/system/role/getAllList',
            method: 'get'
        })
    },

    /**
     *  删除
     * @returns
     */
    delete: (roleId) => {
        return request({
            url: '/manage/system/role/delete',
            params: {roleId},
            method: 'get'
        })
    },

    /**
     *  更新
     * @returns
     */
    update: (data) => {
        return request({
            url: '/manage/system/role/update',
            data,
            method: 'post'
        })
    },

    /**
     *  插入
     * @returns
     */
    insert: (data) => {
        return request({
            url: '/manage/system/role/insert',
            data,
            method: 'post'
        })
    },
}
